package com.woniuxy.springbootrabbit.topic;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicConsumer1 {
    // 接收生产者发送的消息
    @RabbitListener(queues = "topic_a")  // 监听消息队列
    public void accept(String msg){
        System.out.println("消费者A接收到:" + msg);
    }
}
